Skip to main content

Embed Server

A small Node/Express server that serves the embeddable widget. Locally, it runs on http://localhost:3010.

Run it

cd embed
npm install
npm run dev

The dev command prepares static assets, builds the widget bundle, and starts the server.

Pointing a dev site at it

If you're developing a site that embeds the widget (e.g. abair.ie locally), set the widget URL via an env var:

NEXT_PUBLIC_WEBREADER_URL=http://localhost:3010

Restart the framework's dev server after changing it.

Rebuild without restart

CommandPurpose
npm run prepare-publicRefresh static assets (help pages, i18n, CSS)
npm run buildRebundle the widget into a single minified script

Ready to ship? See Production → Embed Server.